<!--
 * @Description: 盒子
 * @Author: charles
 * @Date: 2021-08-12 10:34:17
 * @LastEditors: charles
 * @LastEditTime: 2021-08-12 11:04:30
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>盒子模型</title>
  <style>
    html {
      font:12px/1 '宋体';
    }
    body {margin: 0;}
    .box {
      box-sizing: border-box;
      width: 100px;
      height: 100px;
      background-color: pink;
      
      /* border-width: 2px;
      border-color:rebeccapurple;
      border-style: solid; */
      border: 10px rebeccapurple dashed;

      padding-top: 10px;
      padding-left: 10px;
      padding-right: 10px;

      /* margin: 10px; */
      /* margin: 10px 20px 30px 40px; */
      /* margin: 10px 20px; */
      margin: 10px 20px 30px;
    }
  </style>
</head>
<body>
  <div class="box">盒子一般指的是块元素，盒子是我们布局的重要机制。一个盒子应该由外边距、边框、内边距、内容组成。</div>
  <div class="box">盒子2</div>
</body>
</html>
